package cn.zc.curriculum.service.service;

import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.io.InputStream;
import java.util.concurrent.CompletableFuture;

public interface UploadFileServiceAsync {

    /**
     * 上传文件至oss
     * @param fileStream
     * @param fileSavePath
     */
    void uploadToOss(InputStream fileStream, String fileSavePath);

    /**
     * 删除oss中的图片
     *
     * @return
     */
    CompletableFuture<Boolean> deleteOssFile(String ossPath);


    /**
     * 删除本地文件
     * @param filePath
     */
    void deleteLocalFile(String filePath);



    /**
     * 保存图片文件至本地
     * @param fileStream
     * @param filePath
     * @param localPath
     * @throws IOException
     */
    void saveLocal(InputStream fileStream, String filePath, String localPath) throws IOException;
}
